package com.flute.framework.search;

import java.util.HashMap;

public class SearchKeyword {
	private HashMap<String, String> keyMaps;
	public static final String KEYWORD = "keyword";

	public SearchKeyword() {
		this.keyMaps = new HashMap<String, String>();
	}

	public SearchKeyword(String keyword) {
		this.keyMaps = new HashMap<String, String>();
		this.keyMaps.put(KEYWORD, keyword);
	}

	public void addKey(String field, String keyword) {
		this.keyMaps.put(field, keyword);
	}

	public String[] getFields() {
		return keyMaps.keySet().toArray(new String[] {});
	}

	public String getKeyword(String field) {
		return keyMaps.get(field);
	}

	public String getKeyword() {
		return keyMaps.get(KEYWORD);
	}
}
